package com.crane.oss.sports;

import com.crane.common.framework.http.apache.HttpClientUtils;
import com.crane.common.framework.http.apache.HttpResult;
import com.crane.oss.xunfei.req.QueryAppAnalysisStudentClassCourseReq;
import com.crane.oss.xunfei.req.QueryAppAnalysisStudentPictureReq;
import com.crane.oss.xunfei.req.QueryAppAnalysisTeacherClassCourseReq;
import com.crane.oss.xunfei.resp.ApiListResponse;
import com.crane.oss.xunfei.resp.ApiSingleResponse;
import com.crane.oss.xunfei.resp.AppAnalysisStudentClassCourseResp;
import com.crane.oss.xunfei.resp.AppAnalysisStudentPictureResp;
import com.fasterxml.jackson.core.type.TypeReference;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author zx
 */
@Component
public class XunFeiTestApiService extends XunFeiApiService {
    /**
     * 查询班级学生课堂列表
     */
    public ApiListResponse<AppAnalysisStudentClassCourseResp> getPhysicalTestItem(QueryAppAnalysisStudentClassCourseReq request, String sid, String did, String uid) {
        Map<String, String> params = getStringStringMap(request, sid, did, uid);
        HttpResult httpResult = HttpClientUtils.get(xunFeiAppConfig.getUrl() + "/physical/test/item", params);
        if (httpResult.isSuccess()) {
            ApiListResponse<AppAnalysisStudentClassCourseResp> response = httpResult.getDataObjectByJson(new TypeReference<ApiListResponse<AppAnalysisStudentClassCourseResp>>() {
            });
            return response;
        }
        return ApiListResponse.buildFailure();
    }



    public static void main(String[] args) {
        XunFeiTestApiService xunFeiApiService=new XunFeiTestApiService();



    }
}

